#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

#include <QFile>

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    bool Error_Judge();
    bool Detect_Is_UTF8(QString file_path);
    void File_Error_Handle(size_t row);
    int File_Search(const QString &file_path, const QString &file_name, QStringList &file_list, bool is_recurve);

private slots:
    void on_btnPath_clicked();

    void on_btnSearch_clicked();

    void on_btnStart_clicked();

    void on_lePath_textChanged(const QString &arg1);

    void on_rbU_G_toggled(bool checked);

    void on_leFilter_textChanged(const QString &arg1);

    void on_twFileList_cellDoubleClicked(int row, int column);

private:
    Ui::MainWindow *ui;

    bool _is_searched = false;
    uint16_t _file_qty = 0;
    QStringList _file_filter;
    QStringList _file_list;
};
#endif // MAINWINDOW_H
